import Vue from 'vue'
// 引入
import VueRouter from 'vue-router'
import Layout from '../views/6一级layout.vue'
import Xiangqing from '../views/5.一级详情.vue'
import Denglu from '../views/7登录页面.vue'
import Zhuce from '../views/8注册页面.vue'
import Shoucang from '../views/10我的收藏.vue'
import Chuzu from '../views/11我的出租.vue'
import Quchuzu from '../views/12首页去出租.vue'
// 二级
import Shouye from '../views/1.二级首页.vue'
import Zhaofang from '../views/2.二级找房.vue'
import Zixun from '../views/3.二级咨询.vue'
import Wode from '../views/4.二级我的.vue'
import Wodedlwc from '../views/9我的登录完成.vue'

// 注册
Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect: '/layout/shouye'
    },
  {
    path:'/layout',
    component:Layout,
    children:[
      {
        path:'shouye',
        component:Shouye,
      },
      {
        path:'zhaofang',
        component:Zhaofang,
      },
      {
        path:'zixun',
        component:Zixun,
      },
      {
        path:'wode',
        component:Wode,
      },
      {
        path:'wodedlwc',
        component:Wodedlwc,
      }
    ]
  },
  {
    path:'/xiangqing',
    component:Xiangqing,
  },
  {
    path:'/denglu',
    component:Denglu,
  },
  {
    path:'/zhuce',
    component:Zhuce,
  },
  {
    path:'/shoucang',
    component:Shoucang,
  },
  {
    path:'/chuzu',
    component:Chuzu,
  },
  {
    path:'/quchuzu',
    component:Quchuzu,
  }
]

const router = new VueRouter({
  routes
})

export default router
